import React, { PureComponent } from 'react'
import PropTypes from 'prop-types'
import Cover from '@/components/Cover'
import css from './related.module.scss'
export default class TagVideo extends PureComponent {
    static propTypes = {
        list: PropTypes.array
    }

    render() {
        const { list } = this.props
        return (
            <div className={css['panel']}>
                <div className={css["panel-heading"]}>
                    <span>相关视频</span>                    
                </div>
                <div className={css["panel-body"]}>
                    {
                        list.map(item => {
                            return (
                                <Cover 
                                    key={item.bvid} 
                                    direction="horizontal"
                                    author={item.owner.name}
                                    play={item.stat.view}
                                    danmaku={item.stat.danmaku}                
                                    {...item} 
                                />
                            )
                        })
                    }                    
                </div>
            </div>
        )
    }
}
